<table width="100%"><tr><td width="20%">
<a href="../index.html">&lt; index</a><br />
<a href="index.html">&lt; 11. Compression toolkit</a><br />
<a href="zip_save.html">&lt; 11.3 Saving the compressed data to a file</a>
</td><td width="60%">
<p align="center">
=====================================<br />
11.4 Loading compressed data from a file<br />
=====================================<br />
</p></td><td width="20%">
<a href="zip_get.html">&gt; 11.5 Getting data from the buffer</a>
</td></tr></table>
<style type="text/css">
.code { color:#444444; background-color:#EEEEEE;}
pre { color:#444444; background-color:#EEEEEE;}
table.param td { border : 1px solid #000000; }
th { background-color: #44BBFF; color: #FFFFFF }
table.none td { border : 0 }
</style>
You can read data from a file (compressed or not) into the buffer.<br />
<p class="code"><pre>
C++ : int TCODZip::loadFromFile(const char *filename)
C   : int TCOD_zip_load_from_file(TCOD_zip_t zip, const char *filename)
</pre></p>
<br />
<table class="param">
<tr><th>Parameter</th><th>Description</th></tr>
<tr><td>zip</td><td>In the C version, the buffer handler, returned by the <a href="zip_init.html">constructor</a>.<br /></td></tr>
<tr><td>filename</td><td>Name of the file</td></tr>
</table>
The function returns the number of (uncompressed) bytes read.
<br />
